﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TELOS_Konverter
{
    class Error
    {
        private Exception e;
        private string msg;

        public Error(Exception e, string msg)
        {
            this.e = e;
            this.msg = msg;
        }

        public Error(Exception e)
        {
            this.e = e;
            this.msg = "";
        }

        public Error(string msg)
        {
            this.msg = msg;
            this.e = null;
        }

        public Exception getException()
        {
            // whut?
            if (this.e != null)
                return this.e;
            else
                return null;
        }

        public string getMessage()
        {
            if (!this.msg.Equals(""))
                return this.msg;
            else
                return "";
        }
    }
}
